# -*- coding:utf-8 -*-

#参数
from pygame.sprite import Group

from src.alien import events as e
from src.alien.object import *


def run_game():
    pygame.init()
    ali_settings=Settings()
    screen=pygame.display.set_mode((ali_settings.screen_width,ali_settings.screen_height))
    pygame.display.set_caption('飞船')

    ship=Ship(screen,ali_settings)
    bullets=Group()
    while True:
        e.check_events(ali_settings, screen, ship, bullets)
        ship.update()
        e.update_bullets(bullets)
        e.update_screen(ali_settings, screen, ship, bullets)
run_game()

